<div class="form-reg">
<div class="form-reg-atas"></div>
<div class="form-reg-tengah">
<?php 
if(isset($_SESSION['sys_admin']) and isset($_SESSION['name'])){
?>
<?php
	echo "<h2>".$h2_title."</h2>";
	
?>
<form name="kirim" method="post" action="<?php echo $form_action; ?>" >
	<p>
		<label for="idberita">User ID</label>
		<input type="text" class="form_field" name="user_id" size="30" value="<?php echo set_value('user_id', isset($default['user_id']) ? $default['user_id'] : ''); ?>" disabled />
	</p>
	
	
	<p>
		<label for="tanggal">User Name</label>
		<input type="text" class="form_field" name="name" size="30" value="<?php echo set_value('name', isset($default['name']) ? $default['name'] : ''); ?>" />
		
	</p>
	<p>
		<label for="tanggal">Full Name</label>
		<input type="text" class="form_field" name="fname" size="30" value="<?php echo set_value('fname', isset($default['fname']) ? $default['fname'] : ''); ?>" />
		
	</p>

	<p>
		<label for="judul">Email</label>
		<input type="text" class="form_field" name="email" size="30" value="<?php echo set_value('email', isset($default['email']) ? $default['email'] : ''); ?>" />
		
	</p>
	
	<p>
		<label for="isi">Password</label>
		<input type="password" class="form_field" name="pass" size="30" value="<?php echo set_value('pass2', isset($default['pass2']) ? $default['pass2'] : ''); ?>"  />
		
	</p>
		
	<p>
		<label for="isi">Confirm Password</label>
		<input type="password" class="form_field" name="pass2" size="30" value="<?php echo set_value('pass2', isset($default['pass2']) ? $default['pass2'] : ''); ?>" />
		
	</p>
	<p>
		<label for="isi">Mandiri ID</label>
		<input type="text" class="form_field" name="mandiri_id" size="30" value="<?php echo set_value('mandiri_id', isset($default['mandiri_id']) ? $default['mandiri_id'] : ''); ?>" />
		
	</p>
	<p>
		<label for="isi">Dept Name</label>
		
        <select name="dept_id">
        <?php
			$ql = mysql_query("select * from dept ");
			while($x = mysql_fetch_array($ql)) { ?>
			 <option value="<?php echo $x[0];?>"<?php if($x[0] == $default['dept_id']) echo "selected";?>><?php echo $x[1];?></option>
			<?php }
		?>
        	<option value=""></option>
        </select>
		
	</p>	
	<p>
		<label for="isi">Status</label>
        
		<input type="text" class="form_field" name="status" size="30" value="<?php echo set_value('status', isset($default['status']) ? $default['status'] : ''); ?>" disabled />
		
	</p>	
	<p>
		<label for="isi">User Right</label>
		<select name="user_right">
			<option value="1" <?php if($default['user_right'] == 1) echo "selected";?>>Sys Admin</option>
			<option value="2" <?php if($default['user_right'] == 2) echo "selected";?>>Admin</option>
			<option value="3" <?php if($default['user_right'] == 3) echo "selected";?>>Internal Auditor</option>
			<option value="4" <?php if($default['user_right'] == 4) echo "selected";?>>Sec Consultant</option>
			<option value="5" <?php if($default['user_right'] == 5) echo "selected";?>>Dept Pic</option>
        	
        </select>
        
		
		
	</p>	
	<p>
		<input type="submit" name="kirim" id="submit" value="Update "  />
	</p>
</form>
<?php
	if ( ! empty($link))
	{
		echo '<p id="bottom_link">';
		foreach($link as $links)
		{
			echo $links . ' ';
		}
		echo '</p>';
	}
?>

<?php } ?>
</div>
<div class="form-reg-bawah"></div>
</div>
